import React from "react";

const success = (message:string,afterClose?:() => void,duration?:number):void =>
{
    React.UI.Toast.show({
        icon: 'success',
        content: message,
        duration: duration ? duration : 2000,
        afterClose: afterClose
    })
}

const fail = (message:string,afterClose?:() => void,duration?:number):void =>
{
    React.UI.Toast.show({
        icon: 'fail',
        content: message,
        duration: duration ? duration : 2000,
        afterClose: afterClose
    })
}

export {
    success,
    fail
}